package com.cs2340.taskplusplus;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * An interface for Tasks and TaskLists to implement, since TaskLists hold Doables, which are either TaskLists or Tasks.
 * @author GRILLENBANNER
 *
 */

public interface Doable {
	
	/**
	 * Getter for the name.
	 * @return The name.
	 */
	public String getName();
	/**
	 * Setter for the name.
	 * @param name
	 */
	public void setName(String name);
	
	/**
	 * Getter for description.
	 * @return The description.
	 */
	public String getDescription();

	public void delete();
	
	/**
	 * Setter for the Description.
	 * @param desc
	 */
	public void setDescription(String desc);
	
	/**
	 * Getter for Location.
	 * @return the Location.
	 */
	public Location getLocation();
	
	/**
	 * Setter for the Location.
	 * @param loc
	 */
	public void setLocation(Location loc);
	
	/**
	 * Getter for the Doable's associated categories.
	 * @return a List of the categories.
	 */
	public ArrayList<Label> getLabels();
	
	public void setLabels(ArrayList<Label> labels);
	
	public boolean isList();
	
	/**
	 * Associates the Doable with a new category. Adds the Category to the Doable and the Doable to the Category.
	 * @param cat
	 */

	public void addLabel(Label l);

	/**
	 * Removes a category association from the Doable. Removes the Category from the Doable and the Doable from the Category.
	 * @param l
	 */
	public void removeLabel(Label l);

	/**
	 * Returns true if the Doable has the label
	 * @param l
	 * @return whether the Doable has the label
	 */
	public boolean hasLabel(Label l);
	
	/**
	 * Sets the Doable to the done state.
	 */
	public void setDone();

	/**
	 * Sets the Doable to the not done state.
	 */
	public void setNotDone();

	/**
	 * Get the doneness status of the Doable.
	 * @return The status as a boolean
	 */
	public boolean isDone();
	
	/**
	 * Gets the Doable's parent.
	 * @return The parent TaskList.
	 */
	public String getParentTable();
	
	/**
	 * Sets the Doable's parent.
	 * @param tl The new parent TaskList.
	 */
	public void setParentTable(String tl);
	
	/**
	 * gets the name of the table of applied labels
	 * @return
	 */
		
	public String getLabelTable();
	
	/**
	 * simple setter
	 * @param labelTable
	 */
	public void setLabelTable(String labelTable);
	
	/**
	 * simply retrieves the date due.
	 * @return
	 */
	public Date getDate();
	
	/**
	 * simple setter
	 * @param d
	 */
	public void setDate(Date d);
	
	/**
	 * checks to see if is due after the date given
	 * @param d
	 * @return
	 */
	public boolean isAfter(Date d);
	
	/**
	 * checks to see if due on the date given
	 * @param d
	 * @return
	 */
	public boolean isOn(Date d);
	
	/**
	 * checks to see if due before a date given.
	 * @param d
	 * @return
	 */
	public boolean isBefore(Date d);
}
